/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.designPatterns.proxy;
import java.util.Date;
/**
 *
 * @author minga
 */
public class Proxy {
    SlowThing slowthing;
    public Proxy()
    {
        System.out.println("create proxy at"+ new Date());
    }
    public void sayHello()
    {
       if(slowthing==null) 
       {
           slowthing = new SlowThing();
       }
       slowthing.sayHello();
    }
}
